var TopBar = {
	Visible: true,
	Toggle: function( which ) {
		imgs = which.getElementsByTagName( 'img' )
		if ( this.Visible ) {
			Animations.Create( imgs[ 1 ], 'top', 1000, 0, 26, 0 );
			Animations.Create( which.parentNode, 'top', 1000, 0, -26 );
			Animations.Create( document.getElementById( 'baboo' ), 'opacity', 1000, 1, 0, function () {
				if ( !TopBar.Visible ) {
					document.getElementById( 'baboo' ).style.display = 'none';
				}
			} );
			Animations.Create( document.getElementById( 'metadata' ), 'opacity', 1000, 1, 0, function () {
				if ( !TopBar.Visible ) {
					document.getElementById( 'metadata' ).style.visibility = 'hidden';
				}
			} );
			imgs[ 1 ].style.top = '0px';
			imgs[ 0 ].style.display = 'none';
			imgs[ 1 ].style.display = '';
		}
		else {
			document.getElementById( 'metadata' ).style.visibility = '';
			document.getElementById( 'baboo' ).style.display = '';
			Animations.Create( which.parentNode, 'top', 1000, -26, 0 );
			Animations.Create( document.getElementById( 'baboo' ), 'opacity', 1000, 0, 1 );
			Animations.Create( document.getElementById( 'metadata' ), 'opacity', 1000, 0, 1 );
			imgs[ 0 ].style.top = '26px';
			Animations.Create( imgs[ 0 ], 'top', 1000, 26, 0 );
			imgs[ 0 ].style.display = '';
			imgs[ 1 ].style.display = 'none';
		}
		this.Visible = !this.Visible;
		which.blur();
	}
};
